package pers.qianyu.controller;

import lombok.extern.slf4j.*;
import org.springframework.beans.factory.annotation.*;
import org.springframework.web.bind.annotation.*;
import pers.qianyu.domain.*;
import pers.qianyu.service.*;

@Slf4j
@RestController
public class OrderController3 {
    @Autowired
    private OrderService orderService;

    @GetMapping("/order/prod/{pid}")
    public Order order(@PathVariable Integer pid) {
        log.info("收到{}号商品的下单请求，接下来调用订单微服务查询订单", pid);
        return orderService.createOrder(pid);
    }
}
